package com.lening.controller;

import com.lening.entity.UserBean;
import com.lening.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * 创作时间：2020/3/19 14:07
 * 作者：李增强
 */
@Controller
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("/findAll")
    @ResponseBody
    public void findAll(){
        /**
         * 要是想转json的话，需要自己去配置json的转化器，阿里的和spring的都可以
         */
       List<UserBean> list =  userService.findAll();
        System.out.println(list);
    }
}
